device - 设备
device - 设备
device模块提供了与设备有关的信息与操作,例如获取设备宽高,内存使用率,设备ID,调整设备亮度、音量等。
此模块的部分函数,需要"修改系统设置"的权限。如果没有该权限,会抛出异常。
目录
枚举
类
接口
类型别名
变量
类型别名
PluggedType
Ƭ PluggedType: "usb" | "wireless" | "ac"
StreamType
Ƭ StreamType: "music" | "alarm" | "notification" | "voice_call" | "system" | "ring" | "dtmf" | "accessibility"
音量类型,包括:
music: 音乐(媒体)音量alarm: 闹钟音量notification: 通知音量ring: 铃声音量voice_call: 通话音量system: 系统音量dtmf: DTMF音量accessibility: 辅助功能音量
变量
device
• Const device: Device = Device.instance
